<#include "./common/_header.htm">
<div class="loginContent">
	<div class="loginLogoCon">
		<div class="loginLogob"><div class="loginLogo"></div>
			<span class="loginLogoz">&nbsp;&nbsp;多&nbsp;维&nbsp;数&nbsp;据&nbsp;分&nbsp;析&nbsp;卫&nbsp;士</span></div>

	</div>
	<!--<img class="loginLeft" src="${ctx}/imgs/login-imgs/login-left.png" alt="">-->
	<div class="loginLeft"></div>
	<div class="loginInpCon">
		<form action="${ctx}/login" method="post">
			<!--<div class="loginInpj">-->
				<div class="loginTit">用户登录</div>
				<div class="loginUser">
					<span class="iconRen"></span>
					<input type="text" name="loginname" autocomplete="off" id="loginname" class="userCon" placeholder="请输入用户名">
				</div>
				<div class="loginPass">
					<span class="iconSuo"></span>
					<input type="password" name="password" autocomplete="off" id="password" class="passCon" placeholder="请输入密码">
				</div>
				<div class="loginBtn">
					<button type="button" id="loginButton" class="loginBtn">登&nbsp&nbsp&nbsp录</button>
				</div>
			<!--</div>-->
		</form>
	</div>
	<div class="fortooter">
		<div class="foot-logo">Copyright &copy; 2019&nbsp;&nbsp;&nbsp; 河南迈锐德实业有限公司&nbsp;&nbsp;&nbsp;联系电话：0371-88917000
	</div>
</div>

</div>

<!--<div class="login-wrapper">
	<div class="login-left-circle"></div>
	<div class="login-right-circle"></div>
	<div class="login-box">
		<span class="logo-on"></span>
		<div class="login-box-body">
			<p class="login-box-msg">可视化数据智能分析系统 &nbsp;&nbsp; FS-6000</p>
			<form action="${ctx}/login" method="post">
				<div class="form-group has-feedback">
					<input type="text" name="loginname" id="loginname"
						class="form-control" placeholder="请输入帐号"> 
						<span class="glyphicon glyphicon-envelope form-control-feedback username"></span>
				</div>
				<div class="form-group has-feedback">
					<input type="password" name="password" id="password"
						class="form-control" placeholder="请输入密码"> 
						<span class="glyphicon glyphicon-lock form-control-feedback password"></span>
				</div>
				<div class="row">
					&lt;!&ndash; <div class="col-xs-8">
						<div class="checkbox icheck">
							<label> <input type="checkbox" id="remember">
								记住密码
							</label>
						</div>
					</div> &ndash;&gt;
					<div class="col-xs-12">
						<button type="button" id="loginButton" class="btn btn-primary btn-block btn-flat btn-login">登录</button>

					</div>
				</div>
			</form>
		</div>
	</div>
	<div class="copyright">Copyright &copy; 2018  河南迈锐德实业有限公司 All Rights Reserved</div>
</div>-->
</body>
<script type="text/javascript" src="${ctx}/cus/base.js"></script>
<script>
    $(function() {
    	if(window !=top){  
   			top.location.href = location.href;  
   		}  
        //返回当前 URL 的查询部分（问号 ? 之后的部分）。
        var urlParameters = location.search;
        //声明并初始化接收请求参数的对象
        var requestParameters = new Object();
        //如果该求青中有请求的参数，则获取请求的参数，否则打印提示此请求没有请求的参数
        if (urlParameters.indexOf('?') != -1) {
            //获取请求参数的字符串
            var parameters = decodeURI(urlParameters.substr(1));
            if("error" == parameters){
                toastr.error("登录失败，请联系管理员!","提示信息");
            }else if("badcredentials" == $.trim(parameters)){
                toastr.error("用户名或者密码不正确，请重新输入!","提示信息");
            }else if("disabled" == $.trim(parameters)){
                toastr.error("此用户已被禁用，请联系管理员!","提示信息");
            }else if("timeexpire" == $.trim(parameters)){
                toastr.error("该用户测试版时间已到期，请联系管理员续期","提示信息");
            }else if("viperro" == $.trim(parameters)){
                toastr.error("该正式版没有验证通过，请联系管理员","提示信息");
            }else if("authcodeerro" == $.trim(parameters)){
				toastr.error("授权码没有获取到，请联系管理员","提示信息");
			}else if("diskerro" == $.trim(parameters)){
				toastr.error("疑似非法操作，没有在本机操作，请联系管理员","提示信息");
			}else if("timenotfound" == $.trim(parameters)){
				toastr.error("使用时间过期，请联系管理员","提示信息");
			}
        };
        $('input').iCheck({
            checkboxClass : 'icheckbox_square-blue',
            radioClass : 'iradio_square-blue',
            increaseArea : '20%' // optional
        });
        $("body").addClass("login-page");
        $("body").removeClass("skin-blue");
        /* 回车键时间监听 */
        $(document).keyup(function(event){
            if(event.keyCode ==13){
                var loginName = $.trim($("#loginname").val());
                var password = $.trim($("#password").val());
                if(null == loginName || loginName == undefined || loginName == "" ){
                    toastr.warning("用户名不能为空!","提示信息");
                    return;
                }
                if(null == password || password == undefined || password == "" ){
                    toastr.warning("密码不能为空!","提示信息");
                    return;
                }
                if ($("input[type=checkbox]").is(":checked")) {
                    base.cookie.set("loginname", $("#loginname").val());
                    base.cookie.set("password", $("#password").val());
                    base.cookie.set("remember", true);
                } else {
                    base.cookie.set("loginname", null);
                    base.cookie.set("password", null);
                    base.cookie.set("remember", false);
                }
                $.LoadingOverlay("show");
                $("form").submit();
            }
        });
        /* 登录时间 */
        $("#loginButton").click(function(e){
            var loginName = $.trim($("#loginname").val());
            var password = $.trim($("#password").val());
            if(null == loginName || loginName == undefined || loginName == "" ){
                toastr.warning("用户名不能为空!","提示信息");
                return;
            }
            if(null == password || password == undefined || password == "" ){
                toastr.warning("密码不能为空!","提示信息");
                return;
            }
            if ($("input[type=checkbox]").is(":checked")) {
                base.cookie.set("loginname", $("#loginname").val());
                base.cookie.set("password", $("#password").val());
                base.cookie.set("remember", true);
            } else {
                base.cookie.set("loginname", null);
                base.cookie.set("password", null);
                base.cookie.set("remember", false);
            }
            $.LoadingOverlay("show");
            $("form").submit();
        });

        (function() {
            var checked = base.cookie.get("remember");
            if (checked == "true") {
                var loginname = base.cookie.get("loginname");
                var password = base.cookie.get("password");
                if (loginname && password) {
                    $("#loginname").val(loginname);
                    $("#password").val(password);
                    $("input").iCheck("check");
                }
            } else {
                $("input").iCheck("uncheck");
            }
        })();

        $(".login-wrapper").height($(window).height());
    })
</script>

<style>
	.fortooter {
		height: 40px;
		position: absolute;
		bottom: 0;
		left: 37%;
	}
	.loginLeft{
		background:url(${ctx}/imgs/login-imgs/login-left.png) no-repeat;
		width: 875px;
		height: 531px;
		top: 231px;
		position: absolute;
		left: 50px;
	}
	.wrapper{
		background:url(${ctx}/imgs/login-imgs/login-background.jpg);
	}
	/*.loginLeft{
		margin-top: 145px;
		position: absolute;
		margin-left: 150px;
	}*/
	span.loginLogoz {
		display: inline-block;
		font-size: 34px;
		color: #0093FB;
		margin-top: 5px;
		vertical-align: top;
	}
	.loginLogob{
		background:url(${ctx}/imgs/login-imgs/login-logob.png) no-repeat;
		width: 982px;
		height: 90px;
		margin: 0 auto;
		padding-top: 16px;
	}
	.loginLogo{
		background:url(${ctx}/imgs/login-imgs/login-logot.png) no-repeat;
		width: 49px;
		height: 55px;
		margin-left: 280px;
		display: inline-block;
		margin-top: 3px;
	}
	.loginInpCon {
		background:url(${ctx}/imgs/login-imgs/login-inp.png) no-repeat;
		width: 483px;
		height: 436px;
		float: right;
		margin-right: 340px;
		margin-top: 203px;
		position: relative;
	}
	.loginTit {
		font-size: 24px;
		color: white;
		width: 100%;
		height: 112px;
		line-height: 112px;
		text-align: center;
	}
	.loginUser,
	.loginPass,
	.loginBtn{
		text-align: center;
	}
	.userCon,
	.passCon {
		width: 387px;
		background-color: transparent!important;
		margin-bottom: 20px;
		height: 60px;
		border-radius: 4px;
		border: solid 1px #0093fe;
		color: #fff;
		padding-left: 50px;
		font-size: 16px;
	}
	#loginButton {
		width: 387px;
		color: white;
		height: 60px;
		background-color: #287cdf;
		border-radius: 4px;
		border: none;
		margin-top: 15px;
		font-size: 20px;
	}
	#loginButton:hover{
		background-color: #3296f1;
	}
	:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
		color: #fff;
		font-size: 16px;
	}

	::-moz-placeholder { /* Mozilla Firefox 19+ */
		color: #fff;
		font-size: 16px;
	}

	input:-ms-input-placeholder,
	textarea:-ms-input-placeholder {
		color: #fff;
		font-size: 16px;
	}

	input::-webkit-input-placeholder,
	textarea::-webkit-input-placeholder {
		color: #fff;
		font-size: 16px;
	}
	.iconRen{
		background:url(${ctx}/imgs/login-imgs/login-ren.png);
		width: 23px;
		height: 24px;
		display: inline-block;
		position: absolute;
		left: 62px;
		top: 130px;
	}
	.iconSuo{
		background:url(${ctx}/imgs/login-imgs/login-suo.png);
		width: 22px;
		height: 27px;
		display: inline-block;
		position: absolute;
		left: 66px;
		top: 207px;
	}
</style>
</html>

